import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "../views/HomeView.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "home",
    component: HomeView,
  },
  {
    path: "/admin",
    name: "admin",
    component: () => import("../views/Customer-Service/Admin.vue"),
    children: [
      {
        path: "coupon",
        name: "/admin/coupon",
        component: () => import("../views/Customer-Service/coupon/Coupon.vue"),
      },
      {
        path: "invoice",
        name: "/admin/invoice",
        component: () =>
          import("../views/Customer-Service/invoice/Invoice.vue"),
      },
      {
        path: "order-send",
        name: "/admin/order-send",
        component: () => import("../views/Customer-Service/send/OrderSend.vue"),
      },
      {
        path: "vihecle-send",
        name: "/admin/vihecle-send",
        component: () =>
          import("../views/Customer-Service/send/VihecleSend.vue"),
      },
      {
        path: "vihecle-query",
        name: "/admin/vihecle-query",
        component: () =>
          import("../views/Customer-Service/query/VihecleQuery.vue"),
      },
      {
        path: "willbill-query",
        name: "/admin/willbill-query",
        component: () =>
          import("../views/Customer-Service/query/WillbillQuery.vue"),
      },
      {
        path: "admin-center",
        name: "/admin/admin-center",
        component: () =>
          import("../views/Customer-Service/set-center/AdminCenter.vue"),
      },
      {
        path: "adress",
        name: "/admin/adress",
        component: () =>
          import("../views/Customer-Service/set-center/Adress.vue"),
      },
      {
        path: "default-setting",
        name: "/admin/defult-setting",
        component: () =>
          import("../views/Customer-Service/set-center/DefaultSetting.vue"),
      },
      {
        path: "individuation",
        name: "/admin/individuation",
        component: () =>
          import("../views/Customer-Service/set-center/Individuation.vue"),
      },
      {
        path: "print",
        name: "/admin/print",
        component: () =>
          import("../views/Customer-Service/set-center/Print.vue"),
      },
      {
        path: "hobby-setting",
        name: "/admin/hobby-setting",
        component: () =>
          import(
            "../views/Customer-Service/set-center/hobby-setting/Receipt.vue"
          ),
      },
      {
        path: "time-inquire",
        name: "/admin/time-inquire",
        component: () =>
          import("../views/Customer-Service/time-inquire/TimeInquire.vue"),
      },
    ],
  },
  //姚博文-走进跨域部分
  {
    path: "/enterprise",
    name: "enterprise",
    component: () => import("../views/Enterprise/走进跨越(YBW).vue"),
    children: [
      {
        path: "kye-about",
        name: "/enterprise/kye-about",
        component: () =>
          import("../views/Enterprise/enterprise-introduction/kyeAbout.vue"),
      },
      {
        path: "kye-history",
        name: "/enterprise/kye-history",
        component: () =>
          import("../views/Enterprise/enterprise-introduction/kyeHistory.vue"),
      },
      {
        path: "kye-culture",
        name: "/enterprise/kye-culture",
        component: () =>
          import("../views/Enterprise/enterprise-introduction/kyeCulture.vue"),
      },
      {
        path: "kye-honor",
        name: "/enterprise/kye-honor",
        component: () =>
          import("../views/Enterprise/enterprise-introduction/kyeHonor.vue"),
      },
      {
        path: "kye-video",
        name: "/enterprise/kye-video",
        component: () =>
          import("../views/Enterprise/enterprise-introduction/kyeVideo.vue"),
      },
      {
        path: "invite-school",
        name: "/enterprise/invite-school",
        component: () => import("../views/Enterprise/join-us/inviteSchool.vue"),
      },
      {
        path: "invite-social",
        name: "/enterprise/invite-social",
        component: () => import("../views/Enterprise/join-us/inviteSocial.vue"),
      },
      {
        path: "contact-us",
        name: "/enterprise/contact-us",
        component: () => import("../views/Enterprise/contact-us/contactUs.vue"),
      },
    ],
  },
  {
    path: "/groupPurchasing",
    name: "groupPurchasing",
    component: () => import("../views/Group Procurement/集团采购(YWB).vue"),
    children: [
      {
        path: "concept",
        name: "/groupPurchasing/concept",
        component: () => import("../views/Group Procurement/concept.vue"),
      },
      {
        path: "conduct",
        name: "/groupPurchasing/conduct",
        component: () => import("../views/Group Procurement/conduct.vue"),
      },
      {
        path: "needKnow",
        name: "/groupPurchasing/needKnow",
        component: () => import("../views/Group Procurement/needKnow.vue"),
      },
      {
        path: "demand",
        name: "/groupPurchasing/demand",
        component: () => import("../views/Group Procurement/demand.vue"),
      },
      {
        path: "supplier",
        name: "/groupPurchasing/supplier",
        component: () => import("../views/Group Procurement/supplier.vue"),
      },
      {
        path: "feedback",
        name: "/groupPurchasing/feedback",
        component: () => import("../views/Group Procurement/feedback.vue"),
      },
    ],
  },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
